import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import VueRouter from 'vue-router';

Vue.use(VueRouter)
Vue.use(ElementUI);

import Home from "./components/Home.vue"
import Login from "./components/Login.vue"
import Register from "./components/Register.vue"
import China from "./components/China.vue"
import Echarts from "./components/Echarts.vue"
import Line from "./components/Line.vue"

import * as echarts from 'echarts';
Vue.prototype.$echarts = echarts


const routes = [
  { path: '/', component: Home },
  { path: '/home', component: Home },
  { path: '/login', component: Login },
  { path: '/register', component: Register },
  { path: '/china', component: China },
  { path: '/echarts', component: Echarts },
  { path: '/line', component: Line },
]

const router = new VueRouter({
  routes // (缩写) 相当于 routes:routes
})


Vue.config.productionTip = false



new Vue({
  render: function (h) { return h(App) },
  router,
  echarts
}).$mount('#app')